using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Animations;
using UnityEngine.Playables;

namespace GameLogic
{
    [System.Serializable]
    public class TestPlaybleAsset : PlayableAsset
    {
        // Factory method that generates a playable based on this asset
        public override Playable CreatePlayable(PlayableGraph graph, GameObject go)
        {
            var mixerPlayable = AnimationMixerPlayable.Create(graph, 2);
            var playbleBehavior = ScriptPlayable<TestPlaybleBehaviour>.Create(graph, 1);
            graph.Connect(mixerPlayable, 0, playbleBehavior, 0);
            graph.Play();
            return Playable.Create(graph);
        }
    }
}
